﻿using UserInterface.Primitives;
using WindowsOS;
using WindowsUI;

namespace DirectXTestApp
{
    public class Demo2
    {
        public static int Main(string[] args)
        {
            Window win = new Window();

            Grid g = new Grid();

            g.Rows.Add(new GridBand() { Length = 1, Unit = GridBandUnit.Auto });
            g.Rows.Add(new GridBand() { Length = 1, Unit = GridBandUnit.Percent });
            g.Rows.Add(new GridBand() { Length = 1, Unit = GridBandUnit.Auto });
            g.Rows.Add(new GridBand() { Length = 1, Unit = GridBandUnit.Auto });

            g.Columns.Add(new GridBand() { Length = 1, Unit = GridBandUnit.Auto });
            g.Columns.Add(new GridBand() { Length = 1, Unit = GridBandUnit.Percent });
            g.Columns.Add(new GridBand() { Length = 1, Unit = GridBandUnit.Auto });
            g.Columns.Add(new GridBand() { Length = 1, Unit = GridBandUnit.Auto });

            var leftArrow = new MyButton();
            g.Children.Add(leftArrow);
            Grid.Row.SetValue(leftArrow, 3);

            var horizontalSlider = new MyButton();
            g.Children.Add(horizontalSlider);
            Grid.Row.SetValue(horizontalSlider, 3);
            Grid.Column.SetValue(horizontalSlider, 1);

            var rightArrow = new MyButton();
            g.Children.Add(rightArrow);
            Grid.Row.SetValue(rightArrow, 3);
            Grid.Column.SetValue(rightArrow, 2);

            var topArrow = new MyButton();
            g.Children.Add(topArrow);
            Grid.Column.SetValue(topArrow, 3);

            var verticalSlider = new MyButton();
            g.Children.Add(verticalSlider);
            Grid.Row.SetValue(verticalSlider, 1);
            Grid.Column.SetValue(verticalSlider, 3);

            var bottomArrow = new MyButton();
            g.Children.Add(bottomArrow);
            Grid.Row.SetValue(bottomArrow, 2);
            Grid.Column.SetValue(bottomArrow, 3);

            win.Visual = g;

            win.Show();
            Dispatcher.Current.Run();
            return 0;
        }
    }
}
